package com.ruoyi.web.wx.controller;

import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.web.wx.entity.EnvirBonusTotal;
import com.ruoyi.web.wx.entity.WxUser;
import com.ruoyi.web.wx.service.IEnvirBonusTotalService;
import com.ruoyi.web.wx.service.IWxUserService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 积分列表查询
 * 
 * @author ruoyi
 * @date 2019-08-31
 */
@Controller
@RequestMapping("/system/integral")
public class IntegralController extends BaseController
{
    private String prefix = "system/integral";
	
	@Autowired
	private IEnvirBonusTotalService integralService;
	@Autowired
	private IWxUserService wxUserService;
	
	@RequiresPermissions("system:integral:view")
	@GetMapping()
	public String integral()
	{
	    return prefix + "/integral";
	}
	
	/**
	 * 查询积分列表
	 */
	@RequiresPermissions("system:integral:list")
	@PostMapping("/list")
	@ResponseBody
	public TableDataInfo list(WxUser wxUser)
	{
		startPage();
		List<WxUser> wxUsers = wxUserService.selectWxUserList(wxUser);
		return getDataTable(wxUsers);
	}


}
